package com.itheima.service;

import com.itheima.constant.PageResult;
import com.itheima.constant.QueryPageBean;
import com.itheima.domain.Role;

import java.util.List;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/10/15 11:17
 */
public interface RoleService {

    //查询全部,页面回显;
    public List<Role> findAll();

    //分页查询;
    public PageResult findPage(QueryPageBean queryPageBean);

    //添加数据;
    public void add(Role role, Integer[] permissionIds, Integer[] menuIds);

    //删除数据;
    public void deleteByid(Integer id);

    //根据ID查询,用于页面数据回显;
    public Role findByid(Integer id);

    //角色关联的权限;
    public List<Integer> getPermissionIds(Integer id);

    //角色关联的页面;
    public List<Integer> getMenuIds(Integer id);

    //修改数据;
    public void update(Role role, Integer[] permissionIds, Integer[] menuIds);
}
